package bootstrap

import (
	"gitee.com/pangxianfei/library/config"
	"github.com/kataras/iris/v12"

	LoginAppRoute "tmaic/app/login/routes"
	"tmaic/routes"
)

// LoginApp 登陆中心
func (s *App) LoginApp() error {
	app := iris.New().SetName("LoginApp")
	//注册资源及心跳路由
	route.Route(app)
	LoginAppRoute.Route(app)
	s.UserRouteNameList(app, config.Instance.App.LoginApp, config.Instance.AppPort.LoginPort, config.Instance.AppNo.Login)
	loginErr := s.SetAppConfig(app, config.Instance.AppPort.LoginPort)
	_ = app.Build()
	return loginErr
}
